package com.ydy.common.model;


import java.util.Set;


public class User {

    private Integer id;

    private String userCode;
    private String userName;
    private String passWord;
    private String nickName;
    private String headPortrait;
    /**
     * 用户对应的角色集合
     */
    private Set<Role> roles;

    public User() {
    }

    public User(String userCode, String userName, String passWord, Set<Role> roles) {
        this.userCode = userCode;
        this.userName = userName;
        this.passWord = passWord;
        this.roles = roles;
    }

    public User(String userCode, String nickName, String headPortrait) {
        this.userCode = userCode;
        this.nickName = nickName;
        this.headPortrait = headPortrait;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public Set<Role> getRoles() {
        return roles;
    }

    public void setRoles(Set<Role> roles) {
        this.roles = roles;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getHeadPortrait() {
        return headPortrait;
    }

    public void setHeadPortrait(String headPortrait) {
        this.headPortrait = headPortrait;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userCode='" + userCode + '\'' +
                ", userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", nickName='" + nickName + '\'' +
                ", headPortrait='" + headPortrait + '\'' +
                ", roles=" + roles +
                '}';
    }
}
